home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
...taking it to the Macs!
/
...taking it to the Macs!.iso
/
Extras
/
ActiveX Mac SDK
/
ActiveX SDK
/
Container Common
/
CBindHost.h
< prev
next >
Wrap
Text File
|
1997-01-03
|
3KB
|
104 lines
class CBindHost;
class CBindHostBSC : public IBindStatusCallback
{
public:
/************* CBindHostBSC methods **************/
CBindHostBSC(CBindHost* pBindHost, IBindStatusCallback *pClientBSC);
~CBindHostBSC();
HRESULT Abort(void);
/************** IUnknown methods ***************/
STDMETHOD(QueryInterface)(REFIID riid, void **ppvObjOut);
STDMETHOD_(ULONG, AddRef)();
STDMETHOD_(ULONG, Release)();
/************** IBindStatusCallback methods *************/
STDMETHOD(OnStartBinding)(
/* [in] */ DWORD grfBSCOption,
/* [in] */ IBinding *pib);
STDMETHOD(GetPriority)(
/* [out] */ LONG *pnPriority);
STDMETHOD(OnLowResource)(
/* [in] */ DWORD reserved);
STDMETHOD(OnProgress)(
/* [in] */ ULONG ulProgress,
/* [in] */ ULONG ulProgressMax,
/* [in] */ ULONG ulStatusCode,
/* [in] */ LPCOLESTR szStatusText);
STDMETHOD(OnStopBinding)(
/* [in] */ HRESULT hresult,
/* [in] */ LPCOLESTR szError);
STDMETHOD(GetBindInfo)(
/* [out] */ DWORD *grfBINDINFOF,
/* [unique][out][in] */ BINDINFO *pbindinfo);
STDMETHOD(OnDataAvailable)(
/* [in] */ DWORD grfBSCF,
/* [in] */ DWORD dwSize,
/* [in] */ FORMATETC *pformatetc,
/* [in] */ STGMEDIUM *pstgmed);
STDMETHOD(OnObjectAvailable)(
/* [in] */ REFIID riid,
/* [iid_is][in] */ IUnknown *punk);
private:
LPBINDING m_pBinding;
IBindStatusCallback* m_pClientBSC;
IBindCtx* m_pbc;
CBindHost* m_pBindHost;
DWORD m_RefCount;
};
class CBindHost : public IBindHost
{
public:
/************* CBindHostBSC methods **************/
CBindHost(CXSite* pSite);
~CBindHost();
// IUnknown methods
STDMETHOD (QueryInterface)(REFIID riid, LPVOID *ppvObj);
STDMETHOD_(ULONG,AddRef)();
STDMETHOD_(ULONG,Release)();
// *** IBindHost methods ***
STDMETHOD (CreateMoniker) (LPOLESTR szName, IBindCtx *pBC, IMoniker** ppmk, DWORD dwReserved);
STDMETHOD (MonikerBindToStorage) (IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC,
REFIID riid, void **ppvObj);
STDMETHOD (MonikerBindToObject) (IMoniker *pMk, IBindCtx *pBC, IBindStatusCallback *pBSC,
REFIID riid, void **ppvObj);
// helper for above : monikerbind to object and storage.
STDMETHODIMP MonikerBind(
IMoniker *pMk,
IBindCtx *pBC,
IBindStatusCallback *pBSC,
REFIID riid,
void **ppvObj,
BOOL fObject);
HRESULT AddClient(IBindStatusCallback *pClientBSC, CBindHostBSC **ppBSCHook);
HRESULT RemoveClient(CBindHostBSC *pBSCHook);
HRESULT AbortBindings();
protected:
void AddBSC(CBindHostBSC *Host);
void RemoveBSC(CBindHostBSC *Host);
unsigned long GetCount(void);
unsigned long FindBSC(CBindHostBSC* Host);
CBindHostBSC* GetBSC(unsigned long Index);
DWORD mRefCount; // Reference count
CXSite* mSite; // Aggregator Unknown.
LArray* mBSCList; // list of BisdStatusCallbacks, one for each stream
};